﻿// Write a program that finds the biggest of three integers using nested if statements.

using System;

class FindBiggestOf3Integers
{
    static void Main()
    {
        Console.Write("Enter first number : ");
        string numberStr1 = Console.ReadLine();
        int number1;
        while (!int.TryParse(numberStr1, out number1))
        {
            Console.Write("Invalid input! Please, enter your first number again : ");
            numberStr1 = Console.ReadLine();
        }

        Console.Write("Enter second number : ");
        string numberStr2 = Console.ReadLine();
        int number2;
        while (!int.TryParse(numberStr2, out number2))
        {
            Console.Write("Invalid input! Please, enter your second number again : ");
            numberStr2 = Console.ReadLine();
        }

        Console.Write("Enter third number : ");
        string numberStr3 = Console.ReadLine();
        int number3;
        while (!int.TryParse(numberStr3, out number3))
        {
            Console.Write("Invalid input! Please, enter your third number again : ");
            numberStr3 = Console.ReadLine();
        }

        if (number1 >= number2)
        {
            if (number1 >= number3)
            {
                Console.WriteLine("The biggest number is : " + number1);
            }
            else
            {
                Console.WriteLine("The biggest number is : " + number3);
            }
        }
        else
        {
            if (number2 >= number3)
            {
                Console.WriteLine("The biggest number is : " + number2);
            }
            else
            {
                Console.WriteLine("The biggest number is : " + number3);
            }
        }
    }
}